{{>licenseInfo}}
{{#models}}{{#model}}/*
 * {{classname}}.h
 *
 * {{description}}
 */

#ifndef {{classname}}_H_
#define {{classname}}_H_

{{{defaultInclude}}}
{{#imports}}{{{this}}}
{{/imports}}
#include <nlohmann/json.hpp>
{{#hasOptional}}#include <pistache/optional.h>{{/hasOptional}}

{{#modelNamespaceDeclarations}}
namespace {{this}} {
{{/modelNamespaceDeclarations}}

struct {{classname}}
{
    {{#vars}}
    {{^required}}Pistache::Optional<{{/required}}{{{dataType}}}{{^required}}>{{/required}} {{baseName}};
    {{/vars}}

    bool operator==(const {{classname}}& other) const;
    bool operator!=(const {{classname}}& other) const;

    nlohmann::json to_json() const;
    static {{classname}} from_json(const nlohmann::json& j);
};

void to_json(nlohmann::json& j, const {{classname}}& o);
void from_json(const nlohmann::json& j, {{classname}}& o);

{{#modelNamespaceDeclarations}}
} // {{this}}
{{/modelNamespaceDeclarations}}

#endif /* {{classname}}_H_ */
{{/model}}
{{/models}}
